import request from '@/plugin/axios/request'

const url = '/v1/shops'

/**
 * 获取商铺信息
 * @param {Number} shop_id
 * @returns
 */
export function getShopItem(shop_id) {
  return request({
    url,
    method: 'post',
    data: {
      method: 'get.shop.item',
      shop_id
    }
  })
}

/**
 * 申请开通商户
 * @param {*} data
 */
export function addShopItem(data) {
  return request({
    url,
    method: 'post',
    data: {
      method: 'add.shop.item',
      ...data
    }
  })
}

/**
 * 修改商户信息
 * @param {*} data
 */
export function setShopItem(data) {
  return request({
    url,
    method: 'post',
    data: {
      method: 'set.shop.item',
      ...data
    }
  })
}
